<!DOCTYPE html>
<html>
<head>
  <style>
    html {
      -webkit-overflow-scrolling: touch;
    }

    textarea {
      width: 200px;
      height: 120px;
      margin: 10px;
      border: 1px solid black;
      display: inline-block;
      font-size: 24pt;
      background-color: #CCCCCC;
    }
  </style>
  <script>
    if (window.testRunner)
      testRunner.dumpAsText();

    if (window.internals)
      internals.settings.setPreferCompositingToLCDTextEnabled(true);

    function testScrollability(element)
    {
      // This will cause scrollable element content layers to be offset by y=50 with respect to their scrolling container.
      element.scrollTop = 50;
    }

    function doTest()
    {
      var divs = document.querySelectorAll('body > textarea');
      for (var i = 0; i < divs.length; ++i)
        testScrollability(divs[i]);

      if (window.testRunner)
        document.getElementById('results').innerText = internals.layerTreeAsText(document);
    }
    window.addEventListener('load', doTest, false);
  </script>
</head>
<body>

  <textarea>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit.
  </textarea>

  <textarea disabled>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit.
  </textarea>

  <pre id="results">This test requires DRT.</pre>
</body>
</html>
